package leetcode_900;

/**
 *@author 周杨
 *RectangleOverlap_836 判断两个矩形是否重叠
 *describe:判断四个顶点的方位就可以 AC 100%
 *2018年10月31日 下午1:19:16
 */
public class RectangleOverlap_836 {
	 public boolean isRectangleOverlap(int[] rec1, int[] rec2) {
	        return !(rec1[2] <= rec2[0] ||   // left
	                 rec1[3] <= rec2[1] ||   // bottom
	                 rec1[0] >= rec2[2] ||   // right
	                 rec1[1] >= rec2[3]);    // top
	 }
}
